<script setup lang="ts">
import type { TextProps, VueTypeCom } from '@/types'
import { ref, inject } from 'vue'

const props = defineProps<{
  id: string;
  isShow: boolean;
  name: string;
  editCom: VueTypeCom;
  configKey: string;
  status: string;
}>()
const text = ref(props.status);

const updateStatus = inject('updateStatus');

const handleUpdate = (value:string) => {
  updateStatus(props.configKey, value)
}

</script>

<template>
  <div class="title-editor">
    <div class="title-editor__title mb-20">
      标题内容
    </div>
    <el-input v-model="text" placeholder="请输入题目标题" @update:modelValue="handleUpdate"></el-input>
  </div>
</template>

<style scoped lang="scss">

</style>
